<script setup lang="ts">
import MenuItem from 'element-plus/es/components/menu/src/utils/menu-item.mjs'
import Theme from '@/components/Theme.vue'
import router from '@/router'
</script>

<template>
  <div class="container">
    <div class="top">
      <div class="top-left">
        <div class="page1-but" @click="router.push('/view1')">Page1</div>
        <div class="page2-but" @click="router.push('/view2')">Page2</div>
        <div class="page3-but" @click="router.push('/view3')">Page3</div>
      </div>

      <div class="top-title">数字可视化平台</div>
      <div class="top-right">
        <Theme></Theme>
      </div>
    </div>

    <RouterView></RouterView>
  </div>
</template>
<style scoped lang="scss">
.container {
  width: 100vw;
  height: 100vh;
  background-color: rgb(6, 22, 89);
  position: relative;
  z-index: 0;
  &::after {
    background-image: url('@/assets/img/word.png');
    width: 100vw;
    height: 100vh;
    content: '';
    left: 0;
    top: 0;
    z-index: -1;
    position: absolute;
    background-size: cover;
    opacity: 0.05;
  }
}
.top {
  width: 100vw;
  height: vh(80);
  background-color: rgba(240, 240, 240, 0.075);
  display: flex;
  justify-content: space-between;
  text-align: center;
  line-height: vh(80);
  font-size: vw(25);
  font-weight: 800;
  position: relative;
  // z-index: 10000;
  .top-left {
    display: flex;
    height: vh(80);
    text-align: center;
    line-height: vh(80);
    font-size: 14px;
    div {
      padding-left: vw(10);
      padding-right: vw(10);
    }
    div:hover {
      background-color: rgba(226, 245, 255, 0.336);
      box-shadow: 0px 2px 2px rgb(228, 243, 255);
    }
  }
  .top-title {
    margin: auto;
    // transform: rotateX();
  }
  .top-right {
    display: flex;
    width: vw(180);
    justify-content: center;
    align-items: center;
    margin-right: vw(10);
  }
}
</style>
